-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8357176: java.awt javadoc code examples still use Applet API #25278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back prr! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
It seems the new screenshots could be improved by capturing them on a HiDPI (Retina) display, as the current images appear blurry. And to eliminate background elements in the corners, it might be better to capture screenshots of undecorated windows as was done in the old images. |
* gridbag.setConstraints(button, c); | ||
* add(button); | ||
* } | ||
* static void addButton(String name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* static void addButton(String name, | |
* private static void addButton(String name, |
* static void addButton(String name, | ||
* GridBagLayout gridbag, | ||
* GridBagConstraints c, | ||
* Frame frame) { | ||
* Button button = new Button(name); | ||
* gridbag.setConstraints(button, c); | ||
* frame.add(button); | ||
* } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The add
method should indented by 4 spaces to the right.
* public static void main(String[] args) throws Exception { | ||
* | ||
* setFont(new Font("SansSerif", Font.PLAIN, 14)); | ||
* setLayout(gridbag); | ||
* EventQueue.invokeAndWait(() -> { | ||
* Frame frame = new Frame("GridBagLayout"); | ||
* GridBagLayout gridbag = new GridBagLayout(); | ||
* GridBagConstraints c = new GridBagConstraints(); | ||
* frame.setLayout(gridbag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main
method should be indented by 4 spaces to the right, it's inside GridBagLayoutExample
class.
* <div style="margin:0 auto;width:680px;text-align:center;font-weight:bold"> | ||
* <div style="margin:0 auto;width:850px;text-align:center;font-weight:bold"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to keep the width small as it was?
* tracker.addImage(bg, 0); | ||
* for (int i = 0; i < 5; i++) { | ||
* anim[i] = getImage(getDocumentBase(), | ||
* "images/anim"+i+".gif"); | ||
* anim[i] = tk.getImage("anim"+i+".gif"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* anim[i] = tk.getImage("anim"+i+".gif"); | |
* anim[i] = tk.getImage("anim" + i + ".gif"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The images would look better with square borders… which are left on Windows 10 only.
If it's possible to make the pixels on the rounded corners transparent or at least white, the images would look better.
To make the screenshots look good on High DPI displays, we need several images (preferably at 100%, 150% and 200% as the most common scales) and use the If you just create a screenshot on (Retina at 200% scale), the screenshots will be too large and still blurry as browsers will still scale up the screenshots to the scale of the display because the If we agree to go this way, I can create screenshots on Windows 10 (which still uses square window borders) in different resolutions. |
Update the some code examples and accompanying images to no longer mention or display as applets.
Progress
Warnings
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25278/head:pull/25278
$ git checkout pull/25278
Update a local copy of the PR:
$ git checkout pull/25278
$ git pull https://git.openjdk.org/jdk.git pull/25278/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25278
View PR using the GUI difftool:
$ git pr show -t 25278
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25278.diff
Using Webrev
Link to Webrev Comment